#pragma once
#include"Unordered_map.h"
template<class K,class V,class Hash>
class Mymap
{
public:
	struct MapOfT
	{
		const K operator()(const pair<K, V>& kv)
		{
			return kv.first;
		}
	};
	typedef typename HashTable<K,pair<const K,V>, MapOfT, Hash>::Iterator iterator;
	typedef typename HashTable<K, pair<const K, V>, MapOfT, Hash>::Iterator const_iterator;
	 pair<iterator,bool> insert(const pair<K, V>& kv)
	{
		return _h.Insert(kv);
	}
	iterator begin()
	{
		return _h.Begin();
	}
	iterator end()
	{
		return _h.End();
	}
	const_iterator begin()const
	{
		return _h.Begin();
	}
	const_iterator end()const 
	{
		return _h.End();
	}
private:
	HashTable<K, pair<const K,V>, MapOfT, Hash> _h;
};